<!DOCTYPE html>
<html>
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="gray-bg">
<div class="wrapper wrapper-content ">
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-content">
                    <form class="form-horizontal m-t" id="signupForm">
                        <input id="id" name="id" th:value="${channelProfit.id}" type="hidden">
                        <div class="form-group">
                            <label class="col-sm-3 control-label">渠道名称：</label>
                            <div class="col-sm-8">
                                <input id="channelname" name="channelname" th:value="${channelProfit.channelname}"
                                       readonly="readonly" class="form-control" type="text">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">sdk名称：</label>
                            <div class="col-sm-8">
                                <input id="sdkname" name="sdkname" th:value="${channelProfit.sdkname}"
                                       readonly="readonly" class="form-control"
                                       type="text">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">渠道活跃用户：</label>
                            <div class="col-sm-8">
                                <input onkeyup="this.value=this.value.replace(/\D/g,'')"
                                       onafterpaste="this.value=this.value.replace(/\D/g,'')" maxlength="11"
                                       id="channeldau" name="channeldau"
                                       th:value="${channelProfit.channeldau}"
                                       class="form-control" type="text">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">渠道收入：</label>
                            <div class="col-sm-8">
                                <input maxlength="8" id="channelprofit" name="channelprofit"
                                       th:value="${channelProfit.channelprofit}"
                                       class="form-control" type="text">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">发布状态：</label>
                            <div class="col-sm-8">
                                <select id="publishstate" name="publishstate"
                                        class="form-control">
                                    <option value="0">未发布</option>
                                    <option value="1">已发布</option>
                                </select>
                            </div>
                            <input id="publishstatehidden" name="publishstatehidden"
                                   th:value="${channelProfit.publishstate}" type="hidden">
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">创建日期：</label>
                            <div class="col-sm-8">
                                <input type="text" id="createtime" name="createtime" class="form-control"
                                       placeholder="请选择日期" readonly="readonly"
                                       required="required" aria-required="true"
                                       th:value="${channelProfit.createtime!= null ? #dates.format(channelProfit.createtime,'yyyy-MM-dd'):''}"/>
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-sm-8 col-sm-offset-3">
                                <button type="submit" class="btn btn-primary">提交</button>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
<div th:include="include::footer"></div>
<script type="text/javascript" src="/js/appjs/market/channelProfit/edit.js">
</script>
<link rel="stylesheet" href="@{/bootstrap-datetimepicker/css/bootstrap-datetimepicker.min.css}"
      th:href="@{/bootstrap-datetimepicker/css/bootstrap-datetimepicker.min.css}">
<script th:src="@{/bootstrap-datetimepicker/js/bootstrap-datetimepicker.min.js}"></script>
<script th:src="@{/bootstrap-datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js}"></script>
<script type="text/javascript" th:inline="javascript">
    $(function () {
        $("#publishstate").val($("#publishstatehidden").val());
        /**
         * 日期选择器
         * @param
         */
        $("#createtime").datetimepicker({//选择年月日
            format: 'yyyy-mm-dd',
            language: 'zh-CN',
            weekStart: 1,
            todayBtn: 1,//显示‘今日’按钮
            autoclose: 1,
            todayHighlight: 1,
            startView: 2,
            minView: 2,  //Number, String. 默认值：0, 'hour'，日期时间选择器所能够提供的最精确的时间选择视图。
            clearBtn: true,//清除按钮
            forceParse: 0
        });
    })


</script>
</body>
</html>
